package com.example.common.model;


import com.example.common.model.bean.JVideo;
import com.example.common.model.bean.JavaCourse;
import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by linlongxin on 2016/8/7.
 */

public interface ServiceAPI {



    //courses相关
    @FormUrlEncoded
    @POST("courses/javaCourseList.php")
    Observable<JavaCourse[]> getTextJavaCourseList(@Field("page") int page);

    @FormUrlEncoded
    @POST("courses/javaCourseFromDir.php")
    Observable<JavaCourse[]> getJavaCourseFromDir(@Field("unit") int unit, @Field("page") int page);

    @FormUrlEncoded
    @POST("courses/javaVideoList.php")
    Observable<JVideo[]> getVideoList(@Field("page") int page);

}
